<?php
	session_start();
	include "login/head.html";	
	include "bd/conecta_banco.php";
?>

<html>

<body>

<?php
	$login = $_SESSION['login_usuario'];
		
	if ($login == NULL)
	{
		echo 'Voc&ecirc; n&atilde;o tem permiss&atilde;o para acessar essa &aacute;rea do sistema.';die();
	}
	include "bd/conecta_banco.php";
	$login = $_GET["login"];
   	$sql = "select * from usuario where login='$login';";
  	 $resultado = mysql_query($sql);
   	$linha = mysql_fetch_row($resultado);
 ?>
					
	<p>

		<h1>Modifica&ccedil;&atilde;o do Usu&aacute;rio: <?=mysql_result($resultado, 0,"nome")?></h1><br>
	<p>
		
	<td>
	<form method="post" action="principal.php?acao=AlterarUsuario">
			<p>Nome:<input type="text" name="nome" size="49" value="<?php echo strtoupper($linha[1]); ?>"></p>
			<p>Email:<input type="text" name="email" size="49" value="<?php echo strtoupper($linha[2]); ?>"></p>
			<p>CPF:<input type="text" name="cpf" size="49" value="<?php echo strtoupper($linha[3]); ?>"></p>
						
		</table>
		<p>
		<input type="hidden" value="<?php echo $linha[0]; ?>" name="login">
		<input type="submit" value="Salvar Altera&ccedil;&otilde;es" name="B1">
		<input type="reset" value="Limpar Altera&ccedil;&otilde;es" name="B2"></p>
	</form>
	</td>
		
	</p>
	</table>

</body>
</html>
